home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / vbcc / vars.c < prev    next >
C/C++ Source or Header  |  1995-11-23  |  2KB  |  60 lines

  1.  
  2.  
  3.  
  4. #include "vbc.h"
  5.  
  6. char *typname[]={"strange","char","short","int","long","float","double","void",
  7.                  "pointer","array","struct","union","enum","function"};
  8. char *storage_class_name[]={"strange","auto","register","static","extern","typedef"};
  9.  
  10. char *s,*ident;
  11. char string[MAXINPUT],number[MAXI],buff[MAXI];
  12. struct struct_declaration *first_sd[MAXN],*last_sd[MAXN],*merk_sdf,*merk_sdl;
  13. struct struct_identifier *first_si[MAXN],*last_si[MAXN],*merk_sif,*merk_sil;
  14. struct identifier_list *first_ilist[MAXN],*last_ilist[MAXN],*merk_ilistf,*merk_ilistl;
  15. struct llist *first_llist,*last_llist;
  16. int nesting;
  17. char *empty="";
  18. struct Var *first_var[MAXN],*last_var[MAXN],*merk_varf,*merk_varl;
  19.  
  20. zchar vchar; zuchar vuchar;
  21. zshort vshort; zushort vushort;
  22. zint vint; zuint vuint;
  23. zlong vlong; zulong vulong;
  24. zfloat vfloat; zdouble vdouble;
  25. zpointer vpointer;
  26.  
  27. int DEBUG,MDEBUG=0;
  28.  
  29. int label=0;
  30.  
  31. FILE *in=0,*out=0,*ic1=0,*ic2=0;
  32.  
  33. int nocode;
  34. int registerpri=200,currentpri=0,looppri=10;
  35. int return_label,return_value,break_label,switch_typ,switch_count=0,switch_act=0;
  36. struct Typ *return_typ;
  37. struct Var *return_var;
  38. int local_offset[MAXN];
  39.  
  40. int c_flags[MAXCF]={VALFLAG,STRINGFLAG,0,0,VALFLAG,0,0,0,VALFLAG,FUNCFLAG};
  41. char *c_flags_name[MAXCF]={"O","o","ic1","ic2","debug","noasm","quiet","ansi","maxerrors","dontwarn"};
  42. union ppi c_flags_val[MAXCF];
  43.  
  44. char *inname;
  45.  
  46. int max_offset,function_calls;
  47.  
  48. struct const_list *first_clist=0,*last_clist=0;
  49.  
  50. int afterlabel;
  51.  
  52. struct err_out err_out[]={
  53. #include "errors.h"
  54. "",0
  55. };
  56. int err_num=sizeof(err_out)/sizeof(struct err_out)-1;
  57.  
  58.  
  59. char *copyright="vbcc V0.2m (c) in 1995 by Volker Barthelmann\n";
  60.